package com.coffee.admin.service.platform.dao;

import com.coffee.admin.api.platform.query.CarouselFigureQuery;
import com.coffee.admin.service.platform.bean.CarouselFigure;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CarouselFigureDao {
    public CarouselFigure findById(Integer id);

    public CarouselFigure findByIdForUpdate(Integer id);

    public List<CarouselFigure> findByIds(@Param("idList") List<Integer> idList);

    public Integer count(@Param("param") CarouselFigureQuery param);

    public Integer countByCity(@Param("param") CarouselFigureQuery param);

    public List<CarouselFigure> page(@Param("param") CarouselFigureQuery param, @Param("offset") Integer offset, @Param("rows") Integer rows);

    public List<CarouselFigure> pageByCity(@Param("param") CarouselFigureQuery param, @Param("offset") Integer offset, @Param("rows") Integer rows);

    public CarouselFigure findFirst(@Param("param") CarouselFigureQuery param);

    public Integer insert(CarouselFigure param);

    Integer insertBatch(List<CarouselFigure> list);

    public void updateById(@Param("param") CarouselFigure param);

    public Integer deleteById(Integer id);

    public Integer deleteByIds(List<Integer> idList);

    public Integer updateIsEnableByIds(@Param("list") List<Integer> idList, @Param("isEnable") String isEnable);

    Integer updateIsEnable();

    public Integer insertCity(@Param("carouselFigureId") Integer carouselFigureId, @Param("cityId") Integer cityId);

    public Integer deleteByIdAndCityId(@Param("carouselFigureId") Integer carouselFigureId, @Param("cityId") Integer cityId);

    public Integer findByIdAndCityId(@Param("carouselFigureId") Integer carouselFigureId, @Param("cityId") Integer cityId);

    public List<Integer> findCarouselFigureId(@Param("cityId") Integer cityId);

}